<template>
    <div class="container">
        <div class="orderInfo">
            <span>创建人：{{ orderInfo.CreaterName }}</span>
            <span>业务类型：{{ orderInfo.BusinessName }}</span>
            <span>订单类型：{{ orderInfo.OrderTypeName }}</span>
            <span>订单金额：{{ orderInfo.OrderTotal }}</span>
        </div>
        <div>
            <OrderDetail :orderId="id"/>
        </div>
    </div>
</template>

<script setup lang="ts">
import { reactive, ref } from 'vue';
import OrderDetail from '../../components/OrderDetail.vue';
import orderinfoapi from '../../api/orderinfoapi';


const {id} = defineProps({
    id:{
        type:Number,
        required:true
    }
});

const orderInfo = ref<any>({})

orderinfoapi.Query({id:id}).then(res=>{
    orderInfo.value = res.data[0]
});



</script>

<style scoped>
.container{
    display:grid;
    grid-template-columns: 1fr 1fr;

}
.orderInfo{
    display: grid;
    gap:10px 20px;
    grid-template-columns: 1fr 1fr;
}
</style>